59. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-11-23 04:31:24 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

59.1 Files compared

#LocationFileLast Modified
1/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme 4.0.6/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2023-07-04 11:10:12 +0000
2/Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme 4.0.7/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2023-10-25 03:49:47 +0000

59.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged2998
Changed12
Inserted00
Removed00

59.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

59.4 Active regular expressions

No regular expressions were active.

59.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2015 Magento. All rights reserved. 3  * Copyright © 2015 Magento. All rights reserved.
4  * See COPYING.txt for license details. 4  * See COPYING.txt for license details.
5  */ 5  */
6 use Magento\Framework\App\Action\Action; 6 use Magento\Framework\App\Action\Action;
7  7 
8 // @codingStandardsIgnoreFile 8 // @codingStandardsIgnoreFile
9  9 
10 ?> 10 ?>
11 <?php 11 <?php
12 /** 12 /**
13  * Product list template 13  * Product list template
14  * 14  *
15  * @var $block \Magento\Catalog\Block\Product\ListProduct 15  * @var $block \Magento\Catalog\Block\Product\ListProduct
16  */ 16  */
17 ?> 17 ?>
18 <?php 18 <?php
19 $_productCollection = $block->getLoadedProductCollection(); 19 $_productCollection = $block->getLoadedProductCollection();
20 $_helper = $this->helper('Magento\Catalog\Helper\Output'); 20 $_helper = $this->helper('Magento\Catalog\Helper\Output');
21 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); 21 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
22  22 
23 // Daily deal Helper 23 // Daily deal Helper
24 $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data'); 24 $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data');
25  25 
26 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 26 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
27  27 
28 $_category_config = $_portohelper->getConfig('porto_settings/category'); 28 $_category_config = $_portohelper->getConfig('porto_settings/category');
29 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); 29 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
30 $_product_label_config = $_portohelper->getConfig('porto_settings/product_label'); 30 $_product_label_config = $_portohelper->getConfig('porto_settings/product_label');
31 $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload'); 31 $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload');
32 $_inscrollAjax = $_portohelper->getConfig('layered_navigation/general/ajax_enable'); 32 $_inscrollAjax = $_portohelper->getConfig('layered_navigation/general/ajax_enable');
33 $_inscroll = $_portohelper->getConfig('layered_navigation/general/infinite_scroller'); 33 $_inscroll = $_portohelper->getConfig('layered_navigation/general/infinite_scroller');
34 $_inscroll_mode = $_portohelper->getConfig('layered_navigation/general/infinite_mode'); 34 $_inscroll_mode = $_portohelper->getConfig('layered_navigation/general/infinite_mode');
35 ?> 35 ?>
36 <?php $iterator = 1; ?> 36 <?php $iterator = 1; ?>
37 <?php if (!$_productCollection->count()): ?> 37 <?php if (!$_productCollection->count()): ?>
38     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> 38     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
39 <?php else: ?> 39 <?php else: ?>
40     <?php echo $block->getToolbarHtml() ?> 40     <?php echo $block->getToolbarHtml() ?>
41     <?php echo $block->getAdditionalHtml() ?> 41     <?php echo $block->getAdditionalHtml() ?>
42     <?php 42     <?php
43     if ($block->getMode() == 'grid') { 43     if ($block->getMode() == 'grid') {
44         $viewMode = 'grid'; 44         $viewMode = 'grid';
45         $image = 'category_page_grid'; 45         $image = 'category_page_grid';
46         $hover_image = 'category_page_grid-hover'; 46         $hover_image = 'category_page_grid-hover';
47         $showDescription = false; 47         $showDescription = false;
48         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; 48         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
49         $columns = 'columns'.$_category_grid_config['columns']; 49         $columns = 'columns'.$_category_grid_config['columns'];
50         $product_type = $_category_grid_config['product_type']; 50         $product_type = $_category_grid_config['product_type'];
51         if($product_type == null) { 51         if($product_type == null) {
52             $product_type = 1; 52             $product_type = 1;
53         } 53         }
54     } else { 54     } else {
55         $viewMode = 'list'; 55         $viewMode = 'list';
56         $image = 'category_page_list'; 56         $image = 'category_page_list';
57         $hover_image = 'category_page_list-hover'; 57         $hover_image = 'category_page_list-hover';
58         $showDescription = true; 58         $showDescription = true;
59         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW; 59         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW;
60         $columns = ''; 60         $columns = '';
61         $product_type = 0; 61         $product_type = 0;
62     } 62     }
63     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 63     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
64     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; 64     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
65     $aspect_ratio = $_category_config['aspect_ratio']; 65     $aspect_ratio = $_category_config['aspect_ratio'];
66     if($aspect_ratio) 66     if($aspect_ratio)
67         $image_height = $image_width; 67         $image_height = $image_width;
68     ?> 68     ?>
69     <div class="products wrapper <?php echo $viewMode; ?> <?php echo $columns; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> 69     <div class="products wrapper <?php echo $viewMode; ?> <?php echo $columns; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>">
70         <?php $iterator = 1; ?> 70         <?php $iterator = 1; ?>
71         <ol class="filterproducts products list items product-items"> 71         <ol class="filterproducts products list items product-items">
72             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> 72             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
73             <?php foreach ($_productCollection as $_product): ?> 73             <?php foreach ($_productCollection as $_product): ?>
74                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> 74                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
75                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> 75                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
76                     <?php // Product Image ?> 76                     <?php // Product Image ?>
77                     <div class="product photo product-item-photo"> 77                     <div class="product photo product-item-photo">
78                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> 78                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
79                         <?php 79                         <?php
80                             if($aspect_ratio) 80                             if($aspect_ratio)
81                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 81                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
82                             else 82                             else
83                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); 83                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
84                             $productImageUrl = $productImage->getUrl(); 84                             $productImageUrl = $productImage->getUrl();
85                         ?> 85                         ?>
86                             <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/> 86                             <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/>
87                         <?php if($_category_config['alternative_image']): ?> 87                         <?php if($_category_config['alternative_image']): ?>
88                         <?php 88                         <?php
89                             if($aspect_ratio) 89                             if($aspect_ratio)
90                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 90                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
91                             else 91                             else
92                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); 92                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
93                             $productHoverImageUrl = $productHoverImage->getUrl(); 93                             $productHoverImageUrl = $productHoverImage->getUrl();
94                         ?> 94                         ?>
95                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> 95                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
96                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/> 96                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/>
97                             <?php endif; ?> 97                             <?php endif; ?>
98                         <?php endif; ?> 98                         <?php endif; ?>
99                         </a>
 99                         </a> 
100                         <?php 100                         <?php
101                             $product_label = ""; 101                             $product_label = "";
102                             if($_product_label_config['sale_label']) { 102                             if($_product_label_config['sale_label']) {
103                                 if ($percentage = $_portohelper->getPercentage($_product)) { 103                                 if ($percentage = $_portohelper->getPercentage($_product)) {
104                                     if($_product_label_config['sale_label_percent']) { 104                                     if($_product_label_config['sale_label_percent']) {
105                                         $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; 105                                         $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>';
106                                     } else { 106                                     } else {
107                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; 107                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
108                                     } 108                                     }
109                                 } 109                                 }
110                             } 110                             }
111                             if($_product_label_config['new_label']) { 111                             if($_product_label_config['new_label']) {
112                                 $now = date("Y-m-d"); 112                                 $now = date("Y-m-d");
113                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); 113                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10);
114                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); 114                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10);
115  115 
116                                 if ($newsTo != '' || $newsFrom != ''){ 116                                 if ($newsTo != '' || $newsFrom != ''){
117                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { 117                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
118                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; 118                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
119                                     } 119                                     }
120                                 } 120                                 }
121                             } 121                             }
122                             if($product_label) 122                             if($product_label)
123                                 echo '<div class="product-labels">'.$product_label.'</div>'; 123                                 echo '<div class="product-labels">'.$product_label.'</div>';
124                         ?> 124                         ?>
125                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?> 125                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?>
126                         <div class="product-item-inner"> 126                         <div class="product-item-inner">
127                             <div class="product actions product-item-actions"> 127                             <div class="product actions product-item-actions">
128                                 <div class="actions-primary"> 128                                 <div class="actions-primary">
129                                     <?php if ($_product->isSaleable()): ?> 129                                     <?php if ($_product->isSaleable()): ?>
130                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 130                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
131                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 131                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
132                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 132                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
133                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 133                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
134                                             <?php echo $block->getBlockHtml('formkey')?> 134                                             <?php echo $block->getBlockHtml('formkey')?>
135                                             <button type="submit" 135                                             <button type="submit"
136                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 136                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
137                                                     class="action tocart primary"> 137                                                     class="action tocart primary">
138                                                 <span><?php echo __('Add to Cart') ?></span> 138                                                 <span><?php echo __('Add to Cart') ?></span>
139                                             </button> 139                                             </button>
140                                         </form> 140                                         </form>
141                                     <?php else: ?> 141                                     <?php else: ?>
142                                         <?php if ($_product->getIsSalable()): ?> 142                                         <?php if ($_product->getIsSalable()): ?>
143                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 143                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
144                                         <?php else: ?> 144                                         <?php else: ?>
145                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 145                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
146                                         <?php endif; ?> 146                                         <?php endif; ?>
147                                     <?php endif; ?> 147                                     <?php endif; ?>
148                                 </div> 148                                 </div>
149                                 <?php if ($block->getMode() == 'grid'): ?> 149                                 <?php if ($block->getMode() == 'grid'): ?>
150                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 150                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
151                                   <?php if($_category_config['addtowishlist']): ?> 151                                   <?php if($_category_config['addtowishlist']): ?>
152                                     <a href="#" 152                                     <a href="#"
153                                        class="action towishlist actions-secondary" 153                                        class="action towishlist actions-secondary"
154                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 154                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
155                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 155                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
156                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 156                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
157                                        data-action="add-to-wishlist" 157                                        data-action="add-to-wishlist"
158                                        role="button"> 158                                        role="button">
159                                         <span><?php echo __('Add to Wish List') ?></span> 159                                         <span><?php echo __('Add to Wish List') ?></span>
160                                     </a> 160                                     </a>
161                                   <?php endif; ?> 161                                   <?php endif; ?>
162                                 <?php endif; ?> 162                                 <?php endif; ?>
163                                 <?php endif; ?> 163                                 <?php endif; ?>
164                                 <?php if($_category_config['addtocompare']): ?> 164                                 <?php if($_category_config['addtocompare']): ?>
165                                 <?php 165                                 <?php
166                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 166                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
167                                 ?> 167                                 ?>
168                                 <a href="#" 168                                 <a href="#"
169                                    class="action tocompare actions-secondary" 169                                    class="action tocompare actions-secondary"
170                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 170                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
171                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 171                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
172                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 172                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
173                                    role="button"> 173                                    role="button">
174                                     <span><?php echo __('Add to Compare') ?></span> 174                                     <span><?php echo __('Add to Compare') ?></span>
175                                 </a> 175                                 </a>
176                                 <?php endif; ?> 176                                 <?php endif; ?>
177                             </div> 177                             </div>
178                         </div> 178                         </div>
179                         <?php endif; ?> 179                         <?php endif; ?>
180                         <!-- Dailydeal Product data --> 180                         <!-- Dailydeal Product data -->
181                         <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?> 181                         <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?>
182                         <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?> 182                         <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?>
183                         <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" > 183                         <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" >
184                         <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>"> 184                         <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>">
185                         <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>"> 185                         <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>">
186                             <div class="sw-dailydeal"> 186                             <div class="sw-dailydeal">
187                                 <p id="expired_<?php echo $unique_id; ?>"></p> 187                                 <p id="expired_<?php echo $unique_id; ?>"></p>
188                                 <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;"> 188                                 <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;">
189                                     <span class="dailydeal-label"> 189                                     <span class="dailydeal-label">
190                                         <?php echo __('Ends In:'); ?> 190                                         <?php echo __('Ends In:'); ?>
191                                     </span> 191                                     </span>
192                                     <span class="number-wrapper"> 192                                     <span class="number-wrapper">
193                                         <div class="line"></div> 193                                         <div class="line"></div>
194                                         <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span> 194                                         <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span>
195                                         <div class="caption"><?php echo __('Day(s), '); ?></div> 195                                         <div class="caption"><?php echo __('Day(s), '); ?></div>
196                                     </span> 196                                     </span>
197  197 
198                                     <span class="number-wrapper"> 198                                     <span class="number-wrapper">
199                                         <div class="line"></div> 199                                         <div class="line"></div>
200                                         <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span> 200                                         <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span>
201                                         <div class="caption">:</div> 201                                         <div class="caption">:</div>
202                                     </span> 202                                     </span>
203  203 
204                                     <span class="number-wrapper"> 204                                     <span class="number-wrapper">
205                                         <div class="line"></div> 205                                         <div class="line"></div>
206                                         <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span> 206                                         <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span>
207                                         <div class="caption">:</div> 207                                         <div class="caption">:</div>
208                                     </span> 208                                     </span>
209  209 
210                                     <span class="number-wrapper"> 210                                     <span class="number-wrapper">
211                                         <div class="line"></div> 211                                         <div class="line"></div>
212                                         <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span> 212                                         <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span>
213                                         <div class="caption"></div> 213                                         <div class="caption"></div>
214                                     </span> 214                                     </span>
215                                 </div> 215                                 </div>
216                             </div> 216                             </div>
217                         </div> 217                         </div>
218                         <?php endif; ?> 218                         <?php endif; ?>
219                         <!-- Dailydeal Product End --> 219                         <!-- Dailydeal Product End -->
220                     </div> 220                     </div>
221                     <div class="product details product-item-details"> 221                     <div class="product details product-item-details">
222                         <?php 222                         <?php
223                             $_productNameStripped = $block->stripTags($_product->getName(), null, true); 223                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
224                         ?> 224                         ?>
225                         <strong class="product name product-item-name"> 225                         <strong class="product name product-item-name">
226                             <a class="product-item-link" 226                             <a class="product-item-link"
227                                href="<?php echo $_product->getProductUrl() ?>"> 227                                href="<?php echo $_product->getProductUrl() ?>">
228                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> 228                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
229                             </a> 229                             </a>
230                         </strong> 230                         </strong>
231                         <?php if($_category_config['rating_star']): ?> 231                         <?php if($_category_config['rating_star']): ?>
232                         <?php 232                         <?php
233                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType); 233                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
234                         ?> 234                         ?>
235                         <?php if($review_html): ?> 235                         <?php if($review_html): ?>
236                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> 236                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
237                         <?php else: ?> 237                         <?php else: ?>
238                         <div class="product-reviews-summary short"> 238                         <div class="product-reviews-summary short">
239                             <div class="rating-summary"> 239                             <div class="rating-summary">
240                                 <span class="label"><span>Rating:</span></span> 240                                 <span class="label"><span>Rating:</span></span>
241                                 <div class="rating-result" title="0%"> 241                                 <div class="rating-result" title="0%">
242                                     <span style="width:0"><span>0%</span></span> 242                                     <span style="width:0"><span>0%</span></span>
243                                 </div> 243                                 </div>
244                             </div> 244                             </div>
245                         </div> 245                         </div>
246                         <?php endif; ?> 246                         <?php endif; ?>
247                         <?php endif; ?> 247                         <?php endif; ?>
248  248 
249                         <?php if ($showDescription):?> 249                         <?php if ($showDescription):?>
250                             <div class="product description product-item-description"> 250                             <div class="product description product-item-description">
251                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> 251                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
252                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" 252                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"
253                                    class="action more"><?php echo __('Learn More') ?></a> 253                                    class="action more"><?php echo __('Learn More') ?></a>
254                             </div> 254                             </div>
255                         <?php endif; ?> 255                         <?php endif; ?>
256                         <?php if($_category_config['product_price']): ?> 256                         <?php if($_category_config['product_price']): ?>
257                         <?php echo $block->getProductPrice($_product) ?> 257                         <?php echo $block->getProductPrice($_product) ?>
258                         <?php endif; ?> 258                         <?php endif; ?>
259                         <?php echo $block->getProductDetailsHtml($_product); ?> 259                         <?php echo $block->getProductDetailsHtml($_product); ?>
260  260 
261                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> 261                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?>
262                         <div class="product-item-inner"> 262                         <div class="product-item-inner">
263                             <div class="product actions product-item-actions"> 263                             <div class="product actions product-item-actions">
264                                 <?php if ($block->getMode() == 'grid'): ?> 264                                 <?php if ($block->getMode() == 'grid'): ?>
265                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?> 265                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?>
266                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 266                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
267                                     <a href="#" 267                                     <a href="#"
268                                        class="action towishlist actions-secondary" 268                                        class="action towishlist actions-secondary"
269                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 269                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
270                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 270                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
271                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 271                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
272                                        data-action="add-to-wishlist" 272                                        data-action="add-to-wishlist"
273                                        role="button"> 273                                        role="button">
274                                         <span><?php echo __('Add to Wish List') ?></span> 274                                         <span><?php echo __('Add to Wish List') ?></span>
275                                     </a> 275                                     </a>
276                                 <?php endif; ?> 276                                 <?php endif; ?>
277                                 <?php endif; ?> 277                                 <?php endif; ?>
278                                 <?php endif; ?> 278                                 <?php endif; ?>
279                                 <div class="actions-primary"> 279                                 <div class="actions-primary">
280                                     <?php if ($_product->isSaleable()): ?> 280                                     <?php if ($_product->isSaleable()): ?>
281                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 281                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
282                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 282                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
283                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 283                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
284                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 284                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
285                                             <?php if($product_type == 10):?> 285                                             <?php if($product_type == 10):?>
286                                                 <div class="qty-box"> 286                                                 <div class="qty-box">
287                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> 287                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>
288                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> 288                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
289                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> 289                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>
290                                                 </div> 290                                                 </div>
291                                             <?php endif;?> 291                                             <?php endif;?>
292                                             <?php echo $block->getBlockHtml('formkey')?> 292                                             <?php echo $block->getBlockHtml('formkey')?>
293                                             <button type="submit" 293                                             <button type="submit"
294                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 294                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
295                                                     class="action tocart primary"> 295                                                     class="action tocart primary">
296                                                 <span><?php echo __('Add to Cart') ?></span> 296                                                 <span><?php echo __('Add to Cart') ?></span>
297                                             </button> 297                                             </button>
298                                         </form> 298                                         </form>
299                                     <?php else: ?> 299                                     <?php else: ?>
300                                         <?php if ($_product->getIsSalable()): ?> 300                                         <?php if ($_product->getIsSalable()): ?>
301                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 301                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
302                                         <?php else: ?> 302                                         <?php else: ?>
303                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 303                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
304                                         <?php endif; ?> 304                                         <?php endif; ?>
305                                     <?php endif; ?> 305                                     <?php endif; ?>
306                                 </div> 306                                 </div>
307                                 <?php if ($block->getMode() == 'grid'): ?> 307                                 <?php if ($block->getMode() == 'grid'): ?>
308                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> 308                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?>
309                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 309                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
310                                     <a href="#" 310                                     <a href="#"
311                                        class="action towishlist actions-secondary" 311                                        class="action towishlist actions-secondary"
312                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 312                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
313                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 313                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
314                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 314                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
315                                        data-action="add-to-wishlist" 315                                        data-action="add-to-wishlist"
316                                        role="button"> 316                                        role="button">
317                                         <span><?php echo __('Add to Wish List') ?></span> 317                                         <span><?php echo __('Add to Wish List') ?></span>
318                                     </a> 318                                     </a>
319                                 <?php endif; ?> 319                                 <?php endif; ?>
320                                 <?php endif; ?> 320                                 <?php endif; ?>
321                                 <?php endif; ?> 321                                 <?php endif; ?>
322                                 <?php if ($block->getMode() == 'list'): ?> 322                                 <?php if ($block->getMode() == 'list'): ?>
323                                 <?php if($_category_config['addtowishlist']): ?> 323                                 <?php if($_category_config['addtowishlist']): ?>
324                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 324                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
325                                     <a href="#" 325                                     <a href="#"
326                                        class="action towishlist actions-secondary" 326                                        class="action towishlist actions-secondary"
327                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 327                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
328                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 328                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
329                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 329                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
330                                        data-action="add-to-wishlist" 330                                        data-action="add-to-wishlist"
331                                        role="button"> 331                                        role="button">
332                                         <span><?php echo __('Add to Wish List') ?></span> 332                                         <span><?php echo __('Add to Wish List') ?></span>
333                                     </a> 333                                     </a>
334                                 <?php endif; ?> 334                                 <?php endif; ?>
335                                 <?php endif; ?> 335                                 <?php endif; ?>
336                                 <?php endif; ?> 336                                 <?php endif; ?>
337                                 <?php if($_category_config['addtocompare']): ?> 337                                 <?php if($_category_config['addtocompare']): ?>
338                                 <?php 338                                 <?php
339                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 339                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
340                                 ?> 340                                 ?>
341                                 <a href="#" 341                                 <a href="#"
342                                    class="action tocompare actions-secondary" 342                                    class="action tocompare actions-secondary"
343                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 343                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
344                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 344                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
345                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 345                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
346                                    role="button"> 346                                    role="button">
347                                     <span><?php echo __('Add to Compare') ?></span> 347                                     <span><?php echo __('Add to Compare') ?></span>
348                                 </a> 348                                 </a>
349                                 <?php endif; ?> 349                                 <?php endif; ?>
350                             </div> 350                             </div>
351                         </div> 351                         </div>
352                         <?php endif; ?> 352                         <?php endif; ?>
353                     </div> 353                     </div>
354                 </div> 354                 </div>
355                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> 355                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?>
356             <?php endforeach; ?> 356             <?php endforeach; ?>
357         </ol> 357         </ol>
358     </div> 358     </div>
359     <?php if(isset($_inscroll) && $_inscroll && isset($_inscrollAjax) && $_inscrollAjax):?> 359     <?php if(isset($_inscroll) && $_inscroll && isset($_inscrollAjax) && $_inscrollAjax):?>
360     <div class="infinite-loader<?php if($_inscroll_mode == '2'):?> scrolling<?php endif; ?>"><a href="javascript:void(0)" class="loading" style="display: none;"><?php echo __("Loading ..."); ?></a><a href="javascript:void(0)" class="btn-load-more"><?php echo __("Load More ..."); ?></a></div> 360     <div class="infinite-loader<?php if($_inscroll_mode == '2'):?> scrolling<?php endif; ?>"><a href="javascript:void(0)" class="loading" style="display: none;"><?php echo __("Loading ..."); ?></a><a href="javascript:void(0)" class="btn-load-more"><?php echo __("Load More ..."); ?></a></div>
361     <?php endif;?> 361     <?php endif;?>
362     <?php echo $block->getToolbarHtml() ?> 362     <?php echo $block->getToolbarHtml() ?>
363     <?php if (!$block->isRedirectToCartEnabled()) : ?> 363     <?php if (!$block->isRedirectToCartEnabled()) : ?>
364         <script type="text/x-magento-init"> 364         <script type="text/x-magento-init">
365         { 365         {
366             "[data-role=tocart-form], .form.map.checkout": { 366             "[data-role=tocart-form], .form.map.checkout": {
367                 "catalogAddToCart": {} 367                 "catalogAddToCart": {}
368             } 368             }
369         } 369         }
370         </script> 370         </script>
371     <?php endif; ?> 371     <?php endif; ?>
372     <?php if ($block->getMode() == 'grid'): ?> 372     <?php if ($block->getMode() == 'grid'): ?>
373         <script type="text/javascript"> 373         <script type="text/javascript">
374             require([ 374             require([
375                 'jquery' 375                 'jquery'
376             ], function ($) { 376             ], function ($) {
377                 $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n'); 377                 $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n');
378                 $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); 378                 $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1');
379                 $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n'); 379                 $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n');
380                 $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); 380                 $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1');
381                 $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n'); 381                 $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n');
382                 $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); 382                 $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1');
383                 $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n'); 383                 $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n');
384                 $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); 384                 $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1');
385                 $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n'); 385                 $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n');
386                 $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); 386                 $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1');
387                 $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n'); 387                 $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n');
388                 $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); 388                 $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1');
389                 $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n'); 389                 $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n');
390                 $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); 390                 $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1');
391             }); 391             });
392         </script> 392         </script>
393     <?php endif; ?> 393     <?php endif; ?>
394 <?php endif; ?> 394 <?php endif; ?>
395 <script type="text/javascript"> 395 <script type="text/javascript">
396     require([ 396     require([
397         'jquery' 397         'jquery'
398     ], function ($) { 398     ], function ($) {
399       var app = { 399       var app = {
400           isAppleDevice: function() { 400           isAppleDevice: function() {
401             if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) { 401             if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) {
402               return true; 402               return true;
403             } 403             }
404             return false; 404             return false;
405           } 405           }
406       } 406       }
407     // Timer for LEFT time for Dailydeal product 407     // Timer for LEFT time for Dailydeal product
408         var _second = 1000; 408         var _second = 1000;
409         var _minute = _second * 60; 409         var _minute = _second * 60;
410         var _hour = _minute * 60; 410         var _hour = _minute * 60;
411         var _day = _hour * 24; 411         var _day = _hour * 24;
412         var timer; 412         var timer;
413  413 
414         //Set date as magentodatetime 414         //Set date as magentodatetime
415         var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>'); 415         var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>');
416         if (app.isAppleDevice()) { 416         if (app.isAppleDevice()) {
417           var mdate = '<?php echo $_dailydealhelper->getcurrentDate() ?>'; 417           var mdate = '<?php echo $_dailydealhelper->getcurrentDate() ?>';
418           var dateParts = mdate.substring(0,10).split('-'); 418           var dateParts = mdate.substring(0,10).split('-');
419           var timePart = mdate.substr(11); 419           var timePart = mdate.substr(11);
420           date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart; 420           date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart;
421           date = new Date(date); 421           date = new Date(date);
422         } 422         }
423         var l_date = new Date(); 423         var l_date = new Date();
424         var offset_date = l_date - date; 424         var offset_date = l_date - date;
425  425 
426         function showRemaining() 426         function showRemaining()
427         { 427         {
428             $(".sw-dailydeal-wrapper").each(function(){ 428             $(".sw-dailydeal-wrapper").each(function(){
429                 var unique_id = $(this).attr("data-unique-id"); 429                 var unique_id = $(this).attr("data-unique-id");
430                 // get Value of dailydeal product 430                 // get Value of dailydeal product
431                 var cid='countdown_'+unique_id; 431                 var cid='countdown_'+unique_id;
432                 var daysid='countdown_days_'+unique_id; 432                 var daysid='countdown_days_'+unique_id;
433                 var hoursid='countdown_hours_'+unique_id; 433                 var hoursid='countdown_hours_'+unique_id;
434                 var minutesid='countdown_minutes_'+unique_id; 434                 var minutesid='countdown_minutes_'+unique_id;
435                 var secondsid='countdown_seconds_'+unique_id; 435                 var secondsid='countdown_seconds_'+unique_id;
436  436 
437                 var startdateid='fromdate_'+unique_id; 437                 var startdateid='fromdate_'+unique_id;
438                 var id='todate_'+unique_id; 438                 var id='todate_'+unique_id;
439  439 
440                 var enddate = new Date($('#'+id).val()); 440                 var enddate = new Date($('#'+id).val());
441                 var dealstartdate=new Date($('#'+startdateid).val()); 441                 var dealstartdate=new Date($('#'+startdateid).val());
442                 if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) { 442                 if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) {
443                   var ledate = $('#'+id).val(); 443                   var ledate = $('#'+id).val();
444                   var ledateParts = ledate.substring(0,10).split('-'); 444                   var ledateParts = ledate.substring(0,10).split('-');
445                   var letimePart = ledate.substr(11); 445                   var letimePart = ledate.substr(11);
446                   enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart; 446                   enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart;
447                   enddate = new Date(enddate).getTime(); 447                   enddate = new Date(enddate).getTime();
448  448 
449                   var lsdate = $('#'+startdateid).val(); 449                   var lsdate = $('#'+startdateid).val();
450                   var lsdateParts = lsdate.substring(0,10).split('-'); 450                   var lsdateParts = lsdate.substring(0,10).split('-');
451                   var lstimePart = lsdate.substr(11); 451                   var lstimePart = lsdate.substr(11);
452                   dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart; 452                   dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart;
453                   dealstartdate = new Date(dealstartdate).getTime(); 453                   dealstartdate = new Date(dealstartdate).getTime();
454                 } 454                 }
455                 var currentdate=new Date(); 455                 var currentdate=new Date();
456  456 
457                 //Get Difference between Two dates 457                 //Get Difference between Two dates
458                 var distance = enddate - (currentdate - offset_date); 458                 var distance = enddate - (currentdate - offset_date);
459  459 
460                 $('.sw-dailydeal-wrapper').show(); 460                 $('.sw-dailydeal-wrapper').show();
461  461 
462                 if (distance < 0) { 462                 if (distance < 0) {
463                    // clearInterval(timer); 463                    // clearInterval(timer);
464                     $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); 464                     $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>");
465  465 
466                 } else if(dealstartdate > currentdate) { 466                 } else if(dealstartdate > currentdate) {
467                    $('.countdowncontainer_'+unique_id).hide(); 467                    $('.countdowncontainer_'+unique_id).hide();
468                    var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; 468                    var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>";
469                    $('#expired_'+unique_id).html(msg); 469                    $('#expired_'+unique_id).html(msg);
470                 } else { 470                 } else {
471                     var days = Math.floor(distance / _day); 471                     var days = Math.floor(distance / _day);
472                     var hours = Math.floor((distance % _day) / _hour); 472                     var hours = Math.floor((distance % _day) / _hour);
473                     var minutes = Math.floor((distance % _hour) / _minute); 473                     var minutes = Math.floor((distance % _hour) / _minute);
474                     var seconds = Math.floor((distance % _minute) / _second); 474                     var seconds = Math.floor((distance % _minute) / _second);
475  475 
476                     if(hours < 10) 476                     if(hours < 10)
477                         hours = "0" + hours; 477                         hours = "0" + hours;
478                     if(minutes < 10) 478                     if(minutes < 10)
479                         minutes = "0" + minutes; 479                         minutes = "0" + minutes;
480                     if(seconds < 10) 480                     if(seconds < 10)
481                         seconds = "0" + seconds; 481                         seconds = "0" + seconds;
482                     $('.countdowncontainer_'+unique_id).show(); 482                     $('.countdowncontainer_'+unique_id).show();
483                     $('#'+daysid).html(days); 483                     $('#'+daysid).html(days);
484                     $('#'+hoursid).html(hours); 484                     $('#'+hoursid).html(hours);
485                     $('#'+minutesid).html(minutes); 485                     $('#'+minutesid).html(minutes);
486                     $('#'+secondsid).html(seconds); 486                     $('#'+secondsid).html(seconds);
487                 } 487                 }
488             }); 488             });
489         } 489         }
490  490 
491         // Set Interval 491         // Set Interval
492         timer = setInterval(function() 492         timer = setInterval(function()
493         { 493         {
494             showRemaining(); 494             showRemaining();
495         }, 1000); 495         }, 1000);
496     }); 496     });
497     </script> 497     </script>
498 <?php 498 <?php
499     echo $block->getChildHtml('filter_toggle'); 499     echo $block->getChildHtml('filter_toggle');
500 ?> 500 ?>